package slumpen;

import tools.blast.blastM8Alignment;

public class OrfStat_Orf {

	public int orfLength,start,end;
	
	public blastM8Alignment ba;
	
	public OrfStat_Orf(String s){
		String[] l=s.split("\t");
		start=Integer.parseInt(l[0]);
		end=Integer.parseInt(l[1]);
		orfLength=(end-start)/3;
		ba=new blastM8Alignment();
		ba.tname=l[3];
		ba.strand=new char[] {'+',' '};
		ba.tstart=start;
		ba.tend=end;
	}
	
	public boolean overlap(OrfStat_Orf oo)throws Exception{
		return this.ba.overlaps(oo.ba);
	}
	
	public String toString(){
		return orfLength+"\t"+start+"\t"+end;
	}
}
